System and method for virtual navigation in a gaming environment

ABSTRACT

A system and method for managing and pathfinding using a coarse graph of low-level nodes representing the virtual world of a gaming environment.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims priority to U.S.application Ser. No. 16/393,365, which was filed Apr. 24, 2019. Thedisclosure of the application is hereby incorporated by reference in itsentirety and for all purposes.

FIELD

The present disclosure relates generally to video game systems and morespecifically, but not exclusively, to video game systems and methods formanaging nodes and node graphs relating to non-player characters.

BACKGROUND

Computer games often provide 3D worlds in which the game unfolds. Suchgames often include non-player characters (NPCs) that exist in thegame's 3D world and who interact with the human players, the 3Denvironment and other NPCs. These NPCs can be programmed in anartificial intelligence manor such that their actions in the game aredriven, at least in part, by real-time decisions made by the NPCalgorithm regarding the current state of the game and the environment.Games such as these often use a collection of nodes (vertices) and edges(links) (the collection also known as graphs, directed graphs, nodenetworks, and so on), among other things, to provide paths fornon-player characters (NPCs) to traverse the game world. For example,each node might correspond to a physical location in the game world. Andthe nodes can be connected to one or more other nodes in a grapharchitecture.

Such nodes might have associated metadata that provides relevant gamedata that can be accessed by the NPC to determine its movement. To movearound the game, the NPC can create a path that follows a series ofnodes. For example, in a video game that involves vehicles and roads,nodes can provide road characteristics like speed, lane width, whetherit is a highway, the number of lanes, and so on. Therefore, the seriesof nodes that an NPC can follow can represent a route from a startinglocation to a destination. For a straight section of road, nodes may beconnected to their neighbors in a simple linear fashion creating aunidirectional path. Nodes representing junctions where roadsinterconnect would be more complex. For example, a simple intersectionwhere two roads cross might be represented by a junction node that hasfour connections to other nodes. An NPC vehicle traveling through thatroad would enter via one of the connections and then have three choicesfor exiting the node (four if U-turns are permitted).

A node-based vehicle in conventional video games may make arbitrarydecisions at junctions (wandering behavior). These node-based vehiclesmay not consider certain factors—such as traffic—when determiningnavigation. For example, some systems rely on low level vehicleavoidance to only have NPCs avoid vehicles and objects directly aroundit. This cannot account for changing lanes when parking cars,anticipating a road exit, weather conditions, and the like.

Furthermore, conventional systems only provide limited resources forautomating NPCs. For example, processing power, memory, and efficiencyonly allow for a predetermined number of NPC controlled cars in anysingle instance of a conventional system. However, players of a videogame would expect to see more than a predetermined number of NPCcontrolled cars in a video game for a realistic experience. Inconventional systems, NPCs are often grouped by characteristics andperform the same motions. In fact, some NPCs of conventional systemsfade out of existence as the player approaches the NPC.

As an additional drawback, conventional systems relied almost entirelyon local traffic avoidance for NPCs to avoid collisions. This involves,each frame, checking the local environment for any potentialobstructions (vehicles, pedestrians, objects), building up a view ofthat obstruction from the local vehicle (creating a ‘front facing’polygon which is a list of points/lines that the vehicle will need toavoid in order to not hit the obstruction), generating information aboutthe road the vehicle is on so they can avoid going off-road intobuildings and finally generating and detecting the best steering angleto avoid all the obstructions. This is done every frame for each entityand no knowledge of the previous frame is used. This can result in verylate detection of potential issues and no high level knowledge of ‘thisroad is blocked;’ instead, the system only indicates that there'ssomething in my way to be avoided. Vehicles cannot plan accordingly, forexample, if there is any type of road blockage.

In view of the foregoing, a need exists for an improved system forvirtual navigation in an effort to overcome the aforementioned obstaclesand deficiencies of conventional video game systems.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an exemplary top-level block diagram illustrating oneembodiment of a network multiplayer gaming environment including atleast one peer device;

FIG. 2 is an exemplary top-level block diagram illustrating oneembodiment of a coarse graph of a low-level node network representing avirtual world of a multiplayer game using the network multiplayer gamingenvironment of FIG. 1;

FIG. 3 is an exemplary top-level block diagram illustrating oneembodiment of the coarse graph of FIG. 2;

FIG. 4 is an exemplary top-level flow diagram illustrating oneembodiment of a process for generating the coarse graph of FIG. 3;

FIG. 5 is an exemplary detailed flow diagram illustrating one embodimentof the link creation process of the coarse graph generation process ofFIG. 4;

FIG. 6A is an exemplary top-level diagram illustrating one embodiment ofthe reference tables and data flow for the exemplary coarse graph ofFIG. 3;

FIG. 6B is an exemplary top-level diagram illustrating anotherembodiment of the reference tables and data flow of FIG. 6A;

FIG. 7A is an exemplary top-level block diagram illustrating oneembodiment of the data flow for pathfinding using the coarse graph ofFIG. 3;

FIG. 7B is an exemplary top-level block diagram continuing theillustration of the data flow for pathfinding of FIG. 7A;

FIG. 8 is an exemplary top-level flow diagram illustrating oneembodiment of a process for pathfinding using the coarse graph of FIG.3;

FIG. 9 is an exemplary top-level block diagram illustrating oneembodiment of the data flow for validation of the coarse graph of FIG.3; and

FIG. 10 is an exemplary top-level block diagram illustrating anotherembodiment of the coarse graph of FIG. 2 that includes road densities.

It should be noted that the figures are not drawn to scale and thatelements of similar structures or functions are generally represented bylike reference numerals for illustrative purposes throughout thefigures. It also should be noted that the figures are only intended tofacilitate the description of the preferred embodiments. The figures donot illustrate every aspect of the described embodiments and do notlimit the scope of the present disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

The present disclosure describes a number of methods and computerizedsystems for virtual navigation and management of objects in amultiplayer network gaming community. Since currently-availablemultiplayer gaming systems are deficient because they cannot providerealistic movements for non-player objects in a virtual world withoutincreasing computational resources and/or restricting gamedevelopment/design, a system for managing nodes and node graphs relatingto non-player characters that provides virtual navigation and managementcan prove desirable and provide a basis for a wide range of networkapplications, such as creating a realistic virtual world that is notlimited by hardware and software limitations. This result can beachieved, according to one embodiment disclosed herein, by a nodenetwork system 100 as illustrated in FIG. 1.

Turning to FIG. 1, the node network system 100 is implemented between anetwork 110 (e.g., cloud) comprising a server 115 (e.g., a single servermachine, multiple server machines, and/or a content delivery network)communicating with a plurality of player consoles 101 (shown as anynumber of player consoles 101A-101N). A player console 101 can be anysystem with a processor, memory, capability to connect to the network,and capability of executing gaming software in accordance with thedisclosed embodiments. A hardware and network implementation suitablefor the disclosed system is described in greater detail in commonlyassigned application Ser. No. 13/894,099, entitled “System and Methodfor Network Gaming Architecture,” incorporated herein by reference.

The player console 101A is shown in further detail for illustrationpurposes only. As shown, the player console 101 can include any numberof platforms 102 in communication with an input device 103. For example,the platform 102 can represent any biometrics, motion picture, videogame, medical application, or multimedia platform as desired. Accordingto one embodiment disclosed herein, the platform 102 is a gamingplatform for running game software and various components in signalcommunication with the gaming platform 102, such as a dedicated gameconsole including an XBOX One® manufactured by Microsoft Corp.,PLAYSTATION 4® manufactured by Sony Corporation, and/or WII U®manufactured by Nintendo Corp. In other embodiments, the platform 102can also be a personal computer, laptop, tablet computer, or a handheldmobile device. One or more players can use a gaming platform toparticipate in a game. Multiple gaming platforms may be linked togetherlocally (e.g., via a LAN connection), or via the network 110 (e.g., theInternet or other communication networks).

The network 110 can also include any number of wired data networksand/or any conventional wireless communication network, for example,radio, Wireless Fidelity (Wi-Fi), cellular, satellite, and broadcastingnetworks. Exemplary suitable wireless communication technologies usedwith the network 110 include, but are not limited to, Global System forMobile Communications (GSM), General Packet Radio Service (GPRS), CodeDivision Multiple Access (CDMA), Wideband CDMA (W-CDMA), CDMA2000, IMTSingle Carrier, Enhanced Data Rates for GSM Evolution (EDGE), Long-TermEvolution (LTE), LTE Advanced, Time-Division LTE (TD-LTE), HighPerformance Radio Local Area Network (HiperLAN), High Performance RadioWide Area Network (HiperWAN), High Performance Radio Metropolitan AreaNetwork (HiperMAN), Local Multipoint Distribution Service (LMDS),Worldwide Interoperability for Microwave Access (WiMAX), ZigBee,Bluetooth, Flash Orthogonal Frequency-Division Multiplexing(Flash-OFDM), High Capacity Spatial Division Multiple Access (HC-SDMA),iBurst, Universal Mobile Telecommunications System (UMTS), UMTSTime-Division Duplexing (UMTS-TDD), Evolved High Speed Packet Access(HSPA+), Time Division Synchronous Code Division Multiple Access(TD-SCDMA), Evolution-Data Optimized (EV-DO), Digital Enhanced CordlessTelecommunications (DECT) and others.

The platform 102 typically is electrically coupled to a display device104. For example, the display device 104 can be an output device forpresentation of information from the platform 102 and includes atelevision, a computer monitor, a head-mounted display, a broadcastreference monitor, a medical monitor, the screen on a tablet or mobiledevice, and so on. In some embodiments, the platform 102 and/or thedisplay device 104 is in communication with an audio system (not shown)for presenting audible information.

In FIG. 1, the platform 102 also is electrically or wirelessly coupledto one or more controllers or input devices, such as an input device103. In some embodiments, the input device 103 is a game controller andincludes keyboards, mice, gamepads, joysticks, directional pads, analogsticks, touch screens, and special purpose devices (e.g., steeringwheels for driving games and/or light guns for shooting games).Additionally and/or alternatively, the input device 103 includes aninteractive-motion-tracking system, such the Microsoft Xbox One KINECT®device or the Sony PlayStation 4 Camera®, for tracking the movements ofa player within a 3-dimensional physical space. The input device 103provides data signals to the platform 102, which processes the data andtranslates the player's movements on the display device 104. Theplatform 102 can also perform various calculations or operations oninputs received by the sensor and instruct the display to provide avisual representation of the inputs received as well as effectsresulting from subsequent operations and calculations.

In one embodiment, the platform 102 can be connected via the network 110to the server 115 that can host, for example, multiplayer games andmultimedia information (e.g., scores, rankings, tournaments, and so on).Users can access the server 115 when the platform 102 is online via thenetwork 110. Reference herein to the platform 102 can include gamingplatforms executing video game software or game software (e.g., computerprogram products, tangibly embodied in a computer-readable storagemedium). Additionally and/or alternatively, references to the platform102 can also include hardware only, or a combination of hardware and/orsoftware. In some embodiments, the platform 102 includes hardware and/orsoftware, such as a central processing unit, one or more audioprocessors, one or more graphics processors, and one or more storagedevices.

In some embodiments, a selected player console 101A-N can execute avideo game that includes one or more virtual players in a virtual worldand at least one non-player object (NPC). NPCs can include, for example,cars, boats, aircrafts, and other vehicles in the virtual world. Thevirtual world can include game spaces that are modeled using graphs. Forexample, graphs can be used to explain spatial relationships in thevirtual world as a collection of nodes and edges (also referenced hereinas a “road network”). Accordingly, in the context of a virtual map, forexample, nodes can be used to represent roads and/or junctions thatconnect one or more of the roads (collectively referred to as the “roadnetwork”).

A road can be represented as a collection of nodes joined by links. Asused herein, a graph fork is a node in the graph network that is linkedto more than two other nodes. A junction node is a type of graph forknode that may require special processing (e.g., checking for lights,waiting for vehicles at exits, and so on). Therefore, a junction node isa graph fork node; but not all graph fork nodes require junction nodelogic.

A junction describes all junction nodes and all nodes linked to thatjunction node (e.g., entrance and exit nodes). Junctions can includeinformation that defines its entrance/exit nodes, traffic lights, phasetimings, stop positions, lane laws (e.g., left turn only), and any otherlogic that vehicles require at that junction.

The junction node includes any number of entrance/exit nodes. A node isan entrance if it has any lanes that lead into the junction node(defined on the link between a pair of nodes). Similarly, a node is anexit if the node has lanes leading from the junction node. A node canrepresent both an entrance/exit if there are lanes in and out of thejunction. As an example in the virtual world, junctions can includejunctions with traffic lights, as well as junctions without trafficlights.

Each node includes useful data that defines characteristics of the roador junction. Exemplary data includes speed, classification (e.g., ahighway, a road, a private driveway, private land, and so on), supportedvehicles (e.g., big vehicles, work vehicles, buses, sedans, motorcycles,bicycles, and so on), limitations (e.g., tunnel, low headroom), and soon. In a preferred embodiments, nodes can be contained in an objectoriented data structure, such as a C++ class and/or structure, therebyproviding for ease of scalability and modification.

The road network can also include “links” (or edges) that connect twonodes. Similar to nodes, links include information relating to thatspecific point on the road. Example information in a link objectincludes road width, camber, length of the link, number of lanes, and soon. Nodes provide several functions for entities or objects in thevirtual world. For example, an entity can query the road network withits position in the world to find the nearest road and how to get to itusing the node positions.

In some embodiments, the information related to a specific road can bestored in a selected node, a link connecting two nodes, and/or acombination of both as desired. For example, while information relatedto the width or number of lanes in a road can exist in either a node ora link, information related to the camber of a road is likely maintainedin the link that represents the length of the road (between two nodes)instead of a single node that represents a single point in the world.The data in the node/links can tell entities about the type of road theyare on and to act differently depending on the results. For example,driving slower on residential-type roads or having to perform certainmaneuvers to avoid oncoming traffic on single-lane streets.

Prior art systems generally include road nodes that are spacedrelatively close together. However, for NPCs traveling a longer distanceroute (e.g., an autonomous vehicle that is driving around the city),creating a route for the NPC using the densely situated road nodesresults in a traversal of an extraneous number of nodes. Accordingly, insome embodiments, the node network system 100 can create a high-levelgraph of the road nodes, such as a coarse graph 200 shown in FIG. 2.

Turning to FIG. 2, the coarse graph 200 represents a high-level graph oflow-level nodes 201 in the road network. The underlying low-level node201 graphs often include a lot of repeated information, such as, forexample, repeated lane widths, speed limits, and so on. For example, astraight stretch of road with no entrances or exits in the virtual gamecan be represented as a large number of similar nodes that can beignored for path-finding purposes. The coarse graph 200 can compressthese similar nodes. In other words, the coarse graph 200 can groupsimilar nodes and junctions and can be used for long distancepathfinding. The coarse graph 200 advantageously reduces the number ofloads needed by the processor as every low-level node being representedby the coarse graph 200 need not be in memory at all times. In someembodiments, searching either the coarse graph 200 or the low-levelgraphs that comprise the coarse graph 200 yields the same result—whilesearching the coarse graph 200 advantageously avoids expanding fewerlow-level nodes 201 and saves computational cost and resources.

Each node 203 in the coarse graph 200 includes additional data thatassociates the selected node of the coarse graph 200 with itscorresponding low-level node 201 (e.g., fork node) in the low levelgraph. By way of example, as shown in FIG. 2, the coarse node 203Aincludes an exact copy of the low-level node 201A with some additionaldata described herein; the coarse node 203B similarly associated withthe low-level node 201B; and the coarse node 203C similarly associatedwith the low-level node 201C. In the event that the data of a selectedlow-level node 201 is modified, the modification is dynamically updatedin the associated coarse node 203. In a preferred embodiment, validationof the coarse graph 200 includes determining whether any coarse nodes203 of a collection of low-level nodes 201 representing a straightsection of road includes any different data from other nodes in thecollection. Stated in another way, when running a search on the coarsegraph 200, each node 203/link of the coarse graph 200 includesinformation for each junction that will match the underlying low-levelgraph to get the same results.

As also shown in FIG. 2, in some embodiments, the coarse graph 200 isgenerated from one or more low-level nodes 201 during the build of thegame. Turning now to FIG. 3, an exemplary coarse graph 200 of low-levelnodes 201 is shown. In a preferred embodiment, every low-level node 201between two graph forks includes similar information. Therefore, thecoarse graph 200 can simplify the low-level nodes 201 and create a graphof the graph forks of the low-level nodes 201. The coarse graph 200 canbe constructed in any manner described herein, such as an exemplaryprocess 4000 for coarse graph construction as shown in FIG. 4.

With reference to FIGS. 3 and 4, the process 4000 for coarse graph 200construction begins with a collection of all graph forks 303 (nodeslinked to more than two other nodes), at 4010. In some embodiments, thecollection of graph forks 303 can be maintained in a list. Stated inanother way, once a graph of low-level nodes 201 has been designed torepresent the virtual world, all “fork” nodes 303 are identified in thelow level graph. Fork nodes represent any nodes in the low-level graphthat includes two or more links. These fork nodes require a decision tobe made for any pathfinding search or traversal of the low level graph.

Subsequently, for any collection of nodes in the low level graph thatdoes not include any “fork” nodes and/or includes “fork” nodes that leadto the same destination (e.g., a fork in the graph where one of theexits is a shortcut to the same destination), extra coarse nodes 203 aregenerated to avoid losing information when collapsing the low-levelgraph.

To add extra coarse nodes 203, “circular” paths are determined, at 4020.As used herein, “circular” paths include those nodes and edges forming aself-contained path 301 and those nodes and edges having two graph forksthat lead to one another (e.g., path 302). For both of these paths 301and 302, two extra nodes are added to the list of graph forks 303, at4030. By way of example, FIG. 3 illustrates a self-contained path 301Aand a path 302A including two graph forks 303 that lead to one anotherin the graph of the low-level nodes 201. For each of paths 301A and302A, two additional nodes 301B and 302B for each circular path areadded to list of graph forks 303. In this way, the additional nodesrepresent a path that must be traveled in the coarse graph 200 that mayhave otherwise been lost in the generation of the coarse graph 200 asthe path would eventually lead to the same destination.

Once all graph forks 303 have been determined, links are created betweenselected nodes, at 4040. Turning to FIG. 5, a detailed flow diagram forcreating links between selected nodes is shown. As illustrated, a firstnode is selected, at 4041. For example, with reference to FIG. 3, afirst node 303A is selected. For each link connected to graph fork 303A,the low-level nodes 201 are traversed (at 4042) until a graph fork 303(decision block 4043) from the list prepared in step 4010 is discovered.In the example graph of FIG. 3, the low-level nodes 201 are traversedfrom graph fork 303A until graph fork 303B is reached. A link is thencreated (at 4044) between 303A and 303B that includes the informationstored in any link between the two nodes of the original low-level node201 graph. The sum of the distances of all nodes between 303A and 303Bare copied to the corresponding link in the coarse graph 200.

For each of the extra coarse nodes generated, the associated node in thelow-level graph is marked as a beginning node. Starting from theassociated node, each link of the associated node is traversed until asecond low-level node is reached that is represented by a correspondingnode 203 in the coarse graph 200. The total distance traversed until thesecond low-level node is reached is captured in a link of the coarsegraph 200 that connects the two corresponding nodes 203 in the coarsegraph 200.

In this way, the data for a generated coarse node 203 matches that ofthe low level graph fork node and the link data to the next coarse nodeis copied from any low level link between the two nodes (as they're allthe same). The ‘length’ of the link for the coarse node 203 is a sum ofthe lengths of all the links between the two graph forks in thecorresponding low level nodes 201.

Steps 4041 through 4044 are repeated for all links for the first graphfork 303A, at 4045. Steps 4041 through 4045 are also repeated for allnodes in the graph to create links between all graph forks 303, at 4046.Once completed, the coarse graph 200 shown in FIG. 3 on the right isgenerated from the original graph of the low-level nodes 201 on theleft.

After the structure of the coarse graph 200 has been generated,references to the corresponding graph of the low-level nodes 201 arecreated, at 4050. An exemplary reference table 600 is shown in FIG. 6A.In the low-level graph, an address.region of a selected low-level nodeprovides an index into the list of regions stored in the graph. In theexample shown in FIG. 6A, the road network graph represents a high-levellist of regions that include the nodes and links of the low-level graph.In other words, the road network shown in FIG. 6A represents the roadnetwork of the virtual world and/or the low-level graph. The coarsegraph 200 shown in FIG. 6A includes the list of coarse nodes 203 andcoarse links that is constructed from the road network described herein.In a preferred embodiment, the list of regions is a C++ array datastructure that includes other regions in the virtual world. However,those of skill in the art will appreciate that any object-oriented orgeneric programming data structure can be used as desired.

Each region represents a predetermined area of the virtual world, suchas shown in FIG. 6B (e.g., represented by a minimum and maximum positionin the virtual world (not shown)). As shown, each region includes asingle list of all nodes in that region (e.g., all nodes physicallylocated within the bounds of the region in the virtual world) and asingle list of all links within that region. In other words, the datafor the road network graph can be found from the list of regions. Inthis example, a CNode.Address includes a reference to a selected regionfrom the list of regions using address.region. In addition, theaddress.index can then be used to identify the individual node withinthe regions list of nodes. An index.region is an index of the list ofnodes stored in the region referenced by the address/region. Each coarsenode 203 includes a copy of the low-level node in the low-level graph,with some modifications. For example, as shown in FIG. 6A, theaddress.region and address.index field have been modified so that theindex is a pointer into the coarse graph 200 node and link list. Thecoarse nodes 203 also have an address that represents the correspondingnode in the road network that is represented by the coarse graph 200. Insome embodiments, a node 203 in the coarse graph 200 includes at leasttwo variables (e.g., bits, integers, and so on)—one variable formaintaining the address.region/index of the low-level node describedabove; and a second variable representing the location of the coarsenode position and coarse node link in the coarse graph 200. In otherembodiments, a copy of the low-level node can be maintained such thatthe low-level node.address points into the same location while thecoarseNode.address points into the coarse graph.

Once the references have been established, two extra “dummy” nodes thatinitially include no data are added to the coarse graph 200, at 4060.The dummy nodes can be populated during the path finding with anyassociated links to the dummy nodes (in this case, four additional linksare added) and other relevant data. These dummy nodes can be used forany path finding discussed herein. When a search is requested thatstarts or ends on a road that is ‘between’ two coarse nodes, the closestnode in the low-level graph is used and the generation process describedabove to ‘step’ along the road until finding the coarse nodes on eachedge of the road is performed. This generates routes to the exactposition requested rather than the nearest coarse node that wasgenerated off line and only the road network briefly around thestart/end nodes are loaded when needed.

Advantageously, compared to the low-level node graph, the coarse graph200 can be searched for a more efficient path along any two points inthe virtual world. Since less data needs to be streamed to performsearches, searches are orders of magnitude faster than performingsearches on the low-level graphs. Searches on the coarse graph 200 canbe done in any manner described herein, such as an exemplary process8000 shown in FIG. 8.

Turning to FIG. 8, the process for pathfinding begins by determining thestarting and target nodes on the low-level node 201 graph, at 8010. Forexample, with reference to FIGS. 7A-B, a start node 701 is determined tohave a target node 702 as its destination. In this example, becauseneither the start node 701 or the target node 702 comprises a graph fork(i.e., having no corresponding coarse graph 200 node), two “dummy” nodes703 and 704 are added to the coarse graph 200 (similarly discussed withreference to step 4060 of FIG. 4). In some embodiments, the “dummy”nodes 703 and 704 do not include any data at creation of the coarsegraph 200. Additionally and/or alternatively, associated links can bepopulated with information required to navigate from the dummy nodes atruntime. Advantageously, reserving data population until runtimemaintains list size and reduces computational cost as data is onlyloaded when needed. The node data from the start node 701 and targetnode 702 is copied into the dummy nodes 703 and 704 respectively, at8020, such as shown in FIG. 7A. For each dummy node 703, 704, twoadditional links 703 a, b and 704 a, b are populated with the datarequired to navigate from the dummy node 703, 704, to other coarse nodes(e.g., nodes 705 a, b).

Once the dummy nodes 703, 704 have been populated, a search is conductedusing a modified graph search, at 8030. For example, any pathfinding orgraph traversal can be used to plot an efficient directed path betweennodes 703, 704 on the coarse graph 200. Examples of graph traversaltechniques include, but are not limited to A*, B*, Dijkstra, Edmonds,Fringe search, Hill climbing, beam, Bellman-Ford, iterative deepening,Floyd-Warshall, and the like. In some embodiments, these graph traversaltechniques are modified to account for driving physics (e.g., a u-turninstead of driving in reverse).

In some embodiments, once a path is determined, a full route between thenodes 703 and 704 is constructed using the low-level nodes 201, at 8040.Starting with coarse graph dummy node 703, the address of thecorresponding node in the low-level node 201 graph is determined. Forexample, using the reference table 600 shown in FIG. 6A, thecorresponding address of the low-level node 201 for the dummy node 703can be determined using “CoarseGraph.NodeAddress.” Based on the searchconducted at 8030, the link from the dummy node 703 is traversed to thegraph fork 706 of the coarse graph 200. The node address of thecorresponding low-level node 201 graph for graph fork 706 is thendetermined. For example, the corresponding low-level node for the graphfork 706 of the coarse graph 200 is graph fork 303 b. This constructionprocess is repeated until the target node 704 is reached. This creates afinal route 750 shown in FIG. 7B.

Advantageously, pathfinding on the coarse graph 200 yields the sameresult as pathfinding on low-level nodes 201; however, the pathfindingon the coarse graph 200 expands fewer nodes. As the address for eachrelevant low-level node 201 in the path is known at the coarse graph 200level, pathfinding can be done on both the low-level nodes 201 and thecoarse graph 200.

Additionally and/or alternatively, a start and target node need not bedetermined in the pathfinding process 8000 described herein. In thissituation, a random “wander” path can be constructed that locallyselects exits to use at graph forks based on predetermined gamescenarios.

In some embodiments, route generation includes determining all nodesthat are linked to a current node. Accordingly, a “delegator” representsan object-oriented programming object can be created to abstract thegraph being used from the pathfinding process 8000. Accordingly, whenthe pathfinding process 8000 requests data (e.g., a linked node), thedelegator is called (e.g., “Delegator.GetLinkedNode(node, index)”). Thedelegator retrieves the data from any graph based on the node addressesstored in the coarse graph 200 or the low-level graph nodes to accessthe correct regions/links/nodes, such as shown in FIG. 6A. For example,with reference again to FIG. 6A, the delegator for the coarse graph 200will determine the link index through the coarseNode.Node.Address.indexto access the CoarseGraph.LinkList for that node. The low-level graphdelegator similarly calls node. StartIndexOfLink+index to address thelist of links in the region defined by Node.Address.Region.Advantageously, the delegator handles data access from memory while thepathfinding process 8000 can ignore which graph the search is performedon.

Once the pathfinding process 8000 constructs a final route 750 thatincludes a list of low-level nodes 201, various bits of data can beextracted for node-based navigation. For example, road width, speed,lane information, and so on is queried to create an abstractrepresentation of the road that should be driven on in the video game.The world positions of the nodes are used to create smooth splines thatconnect the nodes so the vehicle generally follows a smooth curved pathwhen navigating the list of nodes. Node based navigation includescreating a list of future nodes that an entity will navigate along usingthe positions of the nodes to create lines/splines to follow. Entitiesusing nodes can query the data to see how fast they should go, how muchspace they can use how tight/sharp upcoming corners are.

For each video game frame that is rendered, the vehicle can update itsposition along the list of nodes for the final route 750 and set desiredspeeds and turning values based on the data in the list of nodes.

In some embodiments, when a vehicle has traveled a predetermined numberof nodes in the final route 750, the vehicle can regenerate a newpathfinding route to account for new nodes and processes that may havebeen added to in-game memory or cache. Advantageously, memory use isimproved as a smaller number of nodes are loaded at any given time for avehicle to correctly navigate from any start to any destination in thegame. As an additional advantage, the entire virtual map for the gameneed not be loaded in memory at all times as the results for a specificroute can be loaded and stored to specific NPC's. In other words, eachNPC can use a local list for pathfinding rather than creating a largerpathfinding route relative to the entire virtual map.

In some embodiments, before the coarse graph 200 is traversed, avalidation can be performed. For example, the low-level graph can bevalidated to prevent data tags on the nodes/links that lead to deadends. By way of example, a road cannot allow “big vehicles” and lead toa junction that does not have any exits for the big vehicle. To avoidthis dead end, start and end nodes of the low-level graph can beverified to check that their data matches (e.g., for relevant tags).

In some embodiments, nodes are associated with various data tags.Relevant tags define restrictions/conditions for using the road andinclude “switched off,” “river,” “no wagons,” “highway,” “private use,”“number of lanes,” “one way street,” and so on. For example, the tag“switched off” can indicate that the road should not be used for aspecific vehicle. When approaching a junction and deciding which nodepath to travel, specific tags can be filtered to eliminate selectednodes from any pathfinding. Turning to FIG. 9, an entire section of thelow-level nodes 201 as well as selected nodes can be “switched off”(nodes 901).

With reference to the low-level nodes of FIG. 9, there are threevalidation situations. First, a validation error is apparent from thenodes leading from node 902 a to 902 b as it creates a dead-end at ajunction where there are no valid exits that are not “switched off”(nodes 901). Accordingly, vehicles approaching this junction will getstuck. Second, at node 903, there are at least two entrances/exits thatare not “switched off” so vehicles approaching this junction can choosea valid exit. Finally, at node 904, a second validation error occurs asthe road suddenly includes “switched off” nodes 901. Vehiclesapproaching node 904 will eventually get stuck.

Although an example is provided using the “switched off” tag, thoseskilled in the art will recognize that any number of validation checkscan occur including, but not limited to, dead ends, conflicting flags(e.g., water and wagon flags), overlapping junctions, distance checksbetween nodes, and so on.

Additionally and/or alternatively, before the coarse graph 200 istraversed, a pre-search optimization can be performed to confirm that acomplete route can be determined using any pathfinding process discussedherein. By way of example, start/end nodes can be on different “islands”of the virtual world. In this example, each node can have an indexrepresenting an “island”, which index can be generated at build-time. Anisland of nodes includes all nodes that are connected to each other bysome order of links. For example, with reference to FIG. 7, there can betwo islands represented by the two unconnected sets of nodes. A checkcan be performed if the start and end nodes for the search are on thesame islands in FIG. 7 during a path finding process. If they are not,there is no feasible path across these two islands. By way of a secondexample, the route can be filtered by any node tags, such as using thevarious data tags that define restrictions/conditions discussed herein.A pre-search optimization can include a check to determine that a fullroute can be generated with nodes having these tags.

While traversing road nodes, each NPC can define its own specificcharacteristics for traversing the road nodes. These characteristics candefine the distinction between vehicle types/models that have variousspeed restrictions and benefits. By way of example, variouscharacteristics and parameters can include acceleration,times/distances, braking times/distances, top speed, cornering speeds(i.e., maximum speeds the vehicle can take at a corner without spinningor going off line). In some embodiments, physics data defines vehiclesize, width, type (e.g., boat versus car), and so on. Driver data candefine driving ability, speed, and so on. Based on the parameter, thedata is generated in any number of ways. For example, acceleration isgenerated by getting the car from a stop to full throttle until itreaches a maximum speed and recording the time taken to reachpredetermined speeds. A data file can be provided that indicatescars/weather/tests to perform to determine optimal characteristics.

As another example, cornering can be generated by getting the vehicle totake corners of different radii at increasing speeds until the vehiclecan't handle the corner. Once this has been done, these points are usedto generate a best-fit curve plotted on a graph. A “type” of curve thatthe data points create is recorded. For example, the type of curve canbe linear, exponential, quadratic, and/or so on. Using acceleration asan example, an offset exponential function can be used: y=a+b*exp(x*−c).In this example, given a speed x, a distance y required to reach thatspeed can returned based on the best-fit curve above. The parameters a,b and c can be generated from the data points for each individual car(or car class) for each different surface and weather type. Thus,instead of having a list of unnecessary points for eachcar/surface/weather, three values a, b, c can be used to get theacceleration result for any value of x. To generate the a, b, and cvalues, a curve fitting process, such as a least squares method, can beused.

In some embodiments, different road nodes can define differentdensities. For example, main streets should have more cars than sidestreets. A low density road next to a high-density road can result inhigh-traffic areas. Low density roads near high density roads can resultin low density roads having fewer vehicles than would be realistic dueto distance checks made via radial distance checks. By way of example,with reference to FIG. 10, a car crossing on a local road 1001 a runningparallel to a busy highway 1002 a can affect the density of the busyhighway 1002 a as the local distance check can consider this “close” forpurposes of a density check on the road. Similarly, a car crossing onthe busy highway 1002 a at an overpass over the local road 1001 b cancause a “false” reading of a car being on the local road 1001 b, despiteno connection/link between the two paths. In both of these examples, thelow density local roads 1001 may have fewer cars than expected as thelarge number of vehicles on the busy highway 1002 can interfere with thenumber of cars that should be on the local road. Furthermore, ambientvehicles can maneuver in any direction following a spawning of thevehicle, thereby leading to unrealistic traffic densities.

Accordingly, in some embodiments, distance checks can also be based onnodes/road networks rather than the local distance/radial check. Thesystem can also push ambient vehicles to alleviate traffic jams.

In this embodiment, distance checks “along” a path are conducted. Forexample, as shown in FIG. 10, the local road 1001 a includes a shortpath to the highway 1002 a so any cars on the local road 1001 a and/orthe highway 1002 a can be considered for density checks. However, forthe local road 1001 b that does not have a path to the highway 1002 a,cars on each road should not be counted against the density for eitherroad.

In some embodiments, a density check can include locating all linksaround a player in a game where a vehicle can be spawned. Locating alllinks depends on where the player is in the virtual world, the directionthey are looking, the road types surrounding the area, and so on. Eachlink can include a “density” value that represents a number of vehiclesper distance that should be surrounding the link. A current density fora selected link is determined and compared to the “density” value forthe link—this determines the number of vehicles that should be spawnedat this location.

By way of example, a link with a density of 4 (i.e., 1 vehicle every 20meters) is determined to have two vehicles, each spaced about 10 metersfrom the link. Each vehicle provides 2 units of “vehicle density” to thelink, which yields a net of density 0 for the number of vehicles thatshould be spawned for this link. In this example, no vehicles are neededto be spawned for this link condition to be satisfied. Alternatively, ifone of the two vehicles moves out of range of the 20 meters, the netdensity is then 2 and a second vehicle can be spawned.

In yet another embodiment, NPCs can also account for exigentcircumstances, such as a high-speed chase. For example, in addition tousing local avoidance based on the coarse graph 200, splines can begenerated through ambient traffic. In other words, vehicles in thevirtual world that are obeying traffic laws are used to generate routesthrough/around them. A list of ambient traffic in the area can begenerated and for each vehicle, information related to the subject NPCis recorded. For example, the space between two vehicles, relativedirection of travel, velocity differences, and so on. Based on thisinformation, a route can be plotted towards the final destination.

The disclosed embodiments are susceptible to various modifications andalternative forms, and specific examples thereof have been shown by wayof example in the drawings and are herein described in detail. It shouldbe understood, however, that the disclosed embodiments are not to belimited to the particular forms or methods disclosed, but to thecontrary, the disclosed embodiments are to cover all modifications,equivalents, and alternatives.

1. A computer-implemented method for virtual navigation in a roadnetwork of a gaming environment, the road network of the gamingenvironment being represented by a low-level graph comprising one ormore low-level nodes joined by links, the method comprising: generating,from the low-level graph of the road network of the gaming environment,a coarse graph of the road network of the gaming environment;determining, using the coarse graph of the road network of the gamingenvironment, a path from a start node to a target node, wherein the pathcomprises coarse graph nodes; and generating, from said path comprisingcoarse graph nodes, a full route from the start node to the target node,wherein the full route comprises low-level nodes.
 2. Thecomputer-implemented method of claim 1, wherein said generating thecoarse graph comprises: selecting graph forks from the low-level nodesof the low-level graph of the road network, the graph forks representingthose low-level nodes having two or more links to other low-level nodes;generating coarse graph nodes based on the selected graph forks;generating extra coarse graph nodes for each collection of nodes of thelow-level nodes that do not include any graph forks and each collectionof nodes of the low-level nodes that include graph forks having acircular path; generating links between the generated coarse graphnodes, the links including information stored in any link between thegraph forks of the low-level nodes and the number of low-level nodesbetween the graph forks; and generating a reference table between thecoarse graph and the low-level nodes.
 3. The computer-implemented methodof claim 2, further comprising generating additional dummy nodes thatinclude no data and additional links for the dummy nodes.
 4. Thecomputer-implemented method of claim 3, wherein said determination ofthe path further comprises copying data from the start node to aselected dummy node and copying data from the target node to a seconddummy node.
 5. The computer-implemented method of claim 2, furthercomprising collecting all the selected graph forks in a list.
 6. Thecomputer-implemented method of claim 2, wherein said generating linksbetween the generated coarse graph nodes comprises traversing thelow-level nodes from a first graph fork to a second graph fork.
 7. Thecomputer-implemented method of claim 1, wherein said determination ofthe path comprises determining whether the start node or the target nodecomprises a graph fork, the graph forks representing those low-levelnodes having two or more links to other low-level nodes.
 8. Thecomputer-implemented method of claim 7, further comprising generatingadditional dummy nodes that include no data and additional links for thedummy nodes when the start node and the target node do not include agraph fork.
 9. The computer-implemented method of claim 8, furthercomprising populating the additional links with data to navigate fromthe dummy nodes to the coarse graph nodes.
 10. The computer-implementedmethod of claim 1, wherein the low-level nodes of the low-level graph ofthe road network comprise one or more data tags that limit navigation inthe gaming environment, the method further comprising performing apre-pathfinding validation of the low-level nodes based on the data tagsto confirm that a full route can be determined.
 11. Thecomputer-implemented method of claim 1, wherein one or more of thecoarse graph nodes and the low-level nodes indicate traffic densities.12. The computer-implemented method of claim 1, wherein said generatingthe coarse graph occurs during a build of the gaming environment.
 13. Anon-transitory nonvolatile computer program product comprising aprocessor-readable medium having a sequence of instructions storedthereon, which, when executed by the processor, causes the processor toexecute virtual navigation, of one or more non-player characters, in aroad network of a gaming environment, the road network of the gamingenvironment being represented by a low-level graph comprising one ormore low-level nodes joined by links, the sequence of instructionscomprising: instructions for generating, from the low-level graph of theroad network of the gaming environment, a coarse graph of the roadnetwork of the gaming environment; instructions for determining, usingthe coarse graph of the road network of the gaming environment, a pathfrom a start node to a target node, wherein the path comprises coarsegraph nodes; and instructions for generating, from said path comprisingcoarse graph nodes, a full route from the start node to the target node,wherein the full route comprises low-level nodes.
 14. The non-transitorynonvolatile computer program product of claim 13, wherein saidinstructions for generating the coarse graph comprises: instructions forselecting graph forks from the low-level nodes of the low-level graph ofthe road network, the graph forks representing those low-level nodeshaving two or more links to other low-level nodes; instructions forgenerating coarse graph nodes based on the selected graph forks;instructions for generating extra coarse graph nodes for each collectionof nodes of the low-level nodes that do not include any graph forks andeach collection of nodes of the low-level nodes that include graph forkshaving a circular path; instructions for generating links between thegenerated coarse graph nodes, the links including information stored inany link between the graph forks of the low-level nodes and the numberof low-level nodes between the graph forks; and instructions forgenerating a reference table between the coarse graph and the low-levelnodes.
 15. The non-transitory nonvolatile computer program product ofclaim 13, further comprising instructions for generating additionaldummy nodes that include no data and additional links for the dummynodes.
 16. A computer-based system for virtual navigation, of one ormore non-player characters, in a road network of a gaming environment,the road network of the gaming environment being represented by alow-level graph comprising one or more low-level nodes joined by links,the system comprising: a server for managing the virtual navigation ofthe one or more non-player characters; and one or more player consolesin operable communication with the server over a network, each playerconsole comprising a gaming platform for executing the gamingenvironment, wherein said server generates, from the low-level graph ofthe road network of the gaming environment, a coarse graph of the roadnetwork of the gaming environment, wherein said server determines, usingthe coarse graph of the road network of the gaming environment, a pathfrom a start node to a target node, wherein the path comprises coarsegraph nodes, and wherein said server generates, from said pathcomprising coarse graph nodes, a full route from the start node to thetarget node, wherein the full route comprises low-level nodes.
 17. Thesystem of claim 16, wherein said server further selects graph forks fromthe low-level nodes of the low-level graph of the road network, thegraph forks representing those low-level nodes having two or more linksto other low-level nodes, generates coarse graph nodes based on theselected graph forks, generates extra coarse graph nodes for eachcollection of nodes of the low-level nodes that do not include any graphforks and each collection of nodes of the low-level nodes that includegraph forks having a circular path, generates links between thegenerated coarse graph nodes, the links including information stored inany link between the graph forks of the low-level nodes and the numberof low-level nodes between the graph forks, and generates a referencetable between the coarse graph and the low-level nodes.
 18. The systemof claim 17, wherein said server further generates additional dummynodes that include no data and additional links for the dummy nodes. 19.The system of claim 18, wherein said server further copies data from thestart node to a selected dummy node and copying data from the targetnode to a second dummy node.
 20. The system of claim 16, wherein saidserver generates the coarse graph during a build of the gamingenvironment by the one or more player consoles.